﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CatchProcessing
{
    public partial class StationInfoDialog : Form
    {
        public StationInfoDialog(string aVesselCode, string aCruise, string aStation)
        {
            InitializeComponent();
            this.Text += Properties.Settings.Default.VesselName;
            this.StationTextBox.Text = "Cruise: " + aCruise + " Station Number: " + aStation;
            DataSets.EASADataSet.longlineRow Row = DataSets.Glob.theEASADataSet.GetLonglineRow(
                aVesselCode, aCruise, aStation);
            this.longlineBindingSource.DataSource = Row;
            this.TZlabel.Text += Row.TIMEZONE;
            this.DurationTextBox.Text = TimeSpan.FromMinutes(Row.DURATION).ToString("hh\\:mm");
        }

        private void OKButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            Close();
        }
    }
}
